<?php
class My_Form_validation extends CI_Form_validation{
	public function __construct($rules = array()){
		parent::__construct($rules);
	}
	
	
	public function valid_date($date){
		if( preg_match('/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/',$date))
		{
			$arr = explode('-',$date);
			$dd = $arr[0];
			$mm = $arr[1];
			$yyyy = $arr[2];
			return (checkdate($mm,$dd,$yyyy));
		}
		else{
			return FALSE;
		}
	}
}